home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / CPlusPlus / WinMod.xh < prev    next >
Encoding:
Text File  |  1997-02-13  |  5.4 KB  |  231 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: WinMod.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODWindowModule_xh
  18. #define SOM_ODWindowModule_xh
  19.  
  20. class ODWindowModule;
  21.  
  22. #define ODWindowModule_MajorVersion 1
  23. #define ODWindowModule_MinorVersion 0
  24.  
  25. /* C++ SOM defs */
  26. #include <somcls.xh>
  27. #include <somcm.xh>
  28.  
  29. /* C++ parent defs */
  30. #ifndef SOM_ODRefCntObject_xh
  31. #include <RefCtObj.xh>
  32. #endif
  33.  
  34. #ifndef ODWindowModule_API
  35. #define ODWindowModule_API
  36. /*
  37.  * -- The Class API
  38.  */
  39.  
  40. /*
  41.  * Start of user-defined types:
  42.  */
  43. class ODFrame;
  44. class ODFacet;
  45. class SOMClass;
  46. class SOMObject;
  47. class ODObject;
  48. class ODExtension;
  49. class ODRefCntObject;
  50. class ODWindowModule;
  51.  
  52. /*
  53.  * End of user-defined types.
  54.  */
  55.  
  56. #ifdef OLDIBMSOMAPISUPPORT
  57. #define ODWindowModuleCClassData ODWindowModuleClassData
  58. #define ODWindowModuleNewClass(major,minor) somNewVersionedClassReference(ODWindowModule,major,minor)
  59. #endif
  60.  
  61. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  62. #define ODWindowModuleMetaClass SOMClass
  63.  
  64. #if PRAGMA_ALIGN_SUPPORTED
  65. #  pragma options align=power
  66. #endif
  67.  
  68. /* The API to the ODWindowModule class object, and the methods it introduces. */
  69. SOMEXTERN struct ODWindowModuleClassDataStructure {
  70. #ifdef OLDIBMSOMAPISUPPORT
  71.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  72. #else
  73.     long zero;
  74. #endif
  75.     somStaticClassInfo *sci;
  76.     somDToken        instanceDataToken;
  77.     long reserved [3];
  78.     somMToken InitWindowModule;
  79.     somMToken ShowWindow;
  80.     somMToken HideWindow;
  81.     somMToken SelectWindow;
  82.     somMToken DeactivateFrontWindows;
  83.     somMToken ActivateFrontWindows;
  84. } SOMDLINK ODWindowModuleClassData;
  85.  
  86. #if PRAGMA_ALIGN_SUPPORTED
  87. #  pragma options align=reset
  88. #endif
  89.  
  90. #if !defined(ODWindowModule_Class_Source) && !defined(SOM_Module_winmod_Source)
  91. #if PRAGMA_IMPORT_SUPPORTED
  92. #pragma import list ODWindowModuleClassData
  93. #endif
  94. #endif
  95.  
  96.  
  97. /*
  98.  * -- Typedefs and inline method declarations for left path inherited methods
  99.  * -- are omitted because this compilation had -museinheritedmethods in effect
  100.  */
  101.  
  102.  
  103. /*
  104.  * -- Typedefs for ODWindowModule Method Procedures
  105.  */
  106. SOMEXTERN {
  107. typedef void   (* SOMLINK somTD_ODWindowModule_InitWindowModule)(ODWindowModule *somSelf, Environment *ev);
  108. typedef void   (* SOMLINK somTD_ODWindowModule_ShowWindow)(ODWindowModule *somSelf, Environment *ev,
  109.         ODPlatformWindow window,
  110.         ODWindowLayer layer);
  111. typedef void   (* SOMLINK somTD_ODWindowModule_HideWindow)(ODWindowModule *somSelf, Environment *ev,
  112.         ODPlatformWindow window);
  113. typedef void   (* SOMLINK somTD_ODWindowModule_SelectWindow)(ODWindowModule *somSelf, Environment *ev,
  114.         ODPlatformWindow window);
  115. typedef void   (* SOMLINK somTD_ODWindowModule_DeactivateFrontWindows)(ODWindowModule *somSelf, Environment *ev);
  116. typedef void   (* SOMLINK somTD_ODWindowModule_ActivateFrontWindows)(ODWindowModule *somSelf, Environment *ev);
  117. }
  118.  
  119. #endif /* ODWindowModule_API */
  120.  
  121.  
  122. /*
  123.  * -- This emitter treats Method Tokens as Thunks by default.
  124.  * -- Use the sc modifier "nothunks" to change this default
  125.  */
  126. #undef somresolve_
  127. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  128.  
  129. /*
  130.  * -- The C++ Wrapper Class for ODWindowModule
  131.  */
  132. class ODWindowModule : public ODRefCntObject
  133. {
  134. public:
  135.  
  136. // ODWindowModule::new registers use of the class object, and then uses somNew
  137. // to allocate memory and load the object method table pointer. 
  138. void *operator new(size_t size)
  139. {
  140.     SOM_IgnoreWarning(size);
  141.     // Allocate memory using the default allocator for ODWindowModule, and
  142.     // clear mem & set method table pointer, call basic initialization
  143. #ifdef SOMCHKNULL
  144.     void * __somResult = (void *)
  145.       somNewObject(ODWindowModule);
  146.     SOMCHKNULL(__somResult);
  147.     return __somResult;
  148. #else
  149.     return (void*) somNewObject(ODWindowModule);
  150. #endif
  151. }
  152.  
  153. // ODWindowModule::delete uses the default deallocator for the object's class.
  154. void operator delete(void * obj)
  155. {
  156.     if (obj) {
  157.         SOM_Resolve(obj,SOMObject,somFree)
  158.            ( (SOMObject*) obj );
  159.     }
  160. }
  161.  
  162. /* method: InitWindowModule */
  163. void   InitWindowModule(Environment *ev)
  164. {
  165.    SOM_ResolveD(this,ODWindowModule,ODWindowModule,InitWindowModule)
  166.     (this,ev);
  167. #ifdef SOMCHKEXCEPT
  168.       SOMCHKEXCEPT;
  169. #endif
  170. }
  171.  
  172. /* method: ShowWindow */
  173. void   ShowWindow(Environment *ev,
  174.         ODPlatformWindow window,
  175.         ODWindowLayer layer)
  176. {
  177.    SOM_ResolveD(this,ODWindowModule,ODWindowModule,ShowWindow)
  178.     (this,ev,window,layer);
  179. #ifdef SOMCHKEXCEPT
  180.       SOMCHKEXCEPT;
  181. #endif
  182. }
  183.  
  184. /* method: HideWindow */
  185. void   HideWindow(Environment *ev,
  186.         ODPlatformWindow window)
  187. {
  188.    SOM_ResolveD(this,ODWindowModule,ODWindowModule,HideWindow)
  189.     (this,ev,window);
  190. #ifdef SOMCHKEXCEPT
  191.       SOMCHKEXCEPT;
  192. #endif
  193. }
  194.  
  195. /* method: SelectWindow */
  196. void   SelectWindow(Environment *ev,
  197.         ODPlatformWindow window)
  198. {
  199.    SOM_ResolveD(this,ODWindowModule,ODWindowModule,SelectWindow)
  200.     (this,ev,window);
  201. #ifdef SOMCHKEXCEPT
  202.       SOMCHKEXCEPT;
  203. #endif
  204. }
  205.  
  206. /* method: DeactivateFrontWindows */
  207. void   DeactivateFrontWindows(Environment *ev)
  208. {
  209.    SOM_ResolveD(this,ODWindowModule,ODWindowModule,DeactivateFrontWindows)
  210.     (this,ev);
  211. #ifdef SOMCHKEXCEPT
  212.       SOMCHKEXCEPT;
  213. #endif
  214. }
  215.  
  216. /* method: ActivateFrontWindows */
  217. void   ActivateFrontWindows(Environment *ev)
  218. {
  219.    SOM_ResolveD(this,ODWindowModule,ODWindowModule,ActivateFrontWindows)
  220.     (this,ev);
  221. #ifdef SOMCHKEXCEPT
  222.       SOMCHKEXCEPT;
  223. #endif
  224. }
  225.  
  226. };   /* ODWindowModule */
  227.  
  228.  
  229.  
  230. #endif       /* SOM_ODWindowModule_xh */
  231.